<!doctype html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="../vendor/bootstrap-icons/font/bootstrap-icons.css">
    <link rel="stylesheet" href="../vendor/bootstrap/dist/css/bootstrap.min.css">
    <title>bs</title>
    <style>

        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            background-color: #fff;
            height: 50px;
            z-index: 3;
            border-bottom: 1px solid #ccc;
        }

        .body {
            position: fixed;
            top: 50px;
            left: 0;
            right: 0;
            bottom: 0;
        }

        /*自己实现全屏的关键代码*/
        .body.fullscreen {
            top: 0;
            z-index: 4;
        }

    </style>
<body>

<!--固定的头部部分-->
<div class="header">fixed头部</div>

<!--内容部分-->
<div class="body">
    <div class="container p-2">
        <div class="row">
            <div class="col">
                <h3>quicktab内部全屏处理</h3>
                <div class="qtab"></div>
            </div>
            <div class="col">
                <h3>加上自己的全屏逻辑处理</h3>
                <div class="qtab2"></div>
            </div>
        </div>
    </div>
</div>


<script src="../vendor/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="../vendor/jquery/dist/jquery.min.js"></script>
<script src="../vendor/bootstrap-quicktab/dist/js/bootstrap-quicktab.min.js"></script>

<script>
    $(function () {

        new Quicktab({
            selector: '.qtab',
            tabs: [
                {title: '页面一', url: 'welcome.html?a=1'},
            ],
            //工具栏配置
            toolbar:{
                //全屏功能配置
                fullscreen: {
                    //启用全屏
                    enable: true
                }
            }

        });


        new Quicktab({
            selector: '.qtab2',
            tabs: [
                {title: '页面二', url: 'welcome.html?a=1'},
            ],
            //工具栏配置
            toolbar:{
                //全屏功能配置
                fullscreen: {
                    //启用全屏
                    enable: true,
                    //全屏回调
                    fullscreen: function () {
                        $('.body').addClass('fullscreen');
                    },
                    //退出全屏回调
                    exitFullscreen: function () {
                        $('.body').removeClass('fullscreen');
                    },
                }
            }
        });

    })


</script>

</body>
</html>